/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package it.apuliait.service.base;

import com.liferay.portal.kernel.bean.BeanReference;
import com.liferay.portal.kernel.bean.IdentifiableBean;
import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
import com.liferay.portal.kernel.dao.orm.Projection;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.search.Indexable;
import com.liferay.portal.kernel.search.IndexableType;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.model.PersistedModel;
import com.liferay.portal.service.BaseLocalServiceImpl;
import com.liferay.portal.service.PersistedModelLocalServiceRegistryUtil;
import com.liferay.portal.service.persistence.UserPersistence;

import it.apuliait.model.CassaPrevidenziale;

import it.apuliait.service.CassaPrevidenzialeLocalService;
import it.apuliait.service.persistence.CassaPrevidenzialePersistence;
import it.apuliait.service.persistence.CausalePagamentoPersistence;
import it.apuliait.service.persistence.DatiTrasportoPersistence;
import it.apuliait.service.persistence.DocumentoPersistence;
import it.apuliait.service.persistence.DocumentoXmlFirmatoPersistence;
import it.apuliait.service.persistence.DocumentoXmlPersistence;
import it.apuliait.service.persistence.LineaFatturaPersistence;
import it.apuliait.service.persistence.PagamentiPersistence;
import it.apuliait.service.persistence.RiceventePersistence;
import it.apuliait.service.persistence.TerzoIntermediarioPersistence;
import it.apuliait.service.persistence.TrasmittentePersistence;

import java.io.Serializable;

import java.util.List;

import javax.sql.DataSource;

/**
 * Provides the base implementation for the cassa previdenziale local service.
 *
 * <p>
 * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link it.apuliait.service.impl.CassaPrevidenzialeLocalServiceImpl}.
 * </p>
 *
 * @author Donatello
 * @see it.apuliait.service.impl.CassaPrevidenzialeLocalServiceImpl
 * @see it.apuliait.service.CassaPrevidenzialeLocalServiceUtil
 * @generated
 */
public abstract class CassaPrevidenzialeLocalServiceBaseImpl
	extends BaseLocalServiceImpl implements CassaPrevidenzialeLocalService,
		IdentifiableBean {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this class directly. Always use {@link it.apuliait.service.CassaPrevidenzialeLocalServiceUtil} to access the cassa previdenziale local service.
	 */

	/**
	 * Adds the cassa previdenziale to the database. Also notifies the appropriate model listeners.
	 *
	 * @param cassaPrevidenziale the cassa previdenziale
	 * @return the cassa previdenziale that was added
	 * @throws SystemException if a system exception occurred
	 */
	@Indexable(type = IndexableType.REINDEX)
	@Override
	public CassaPrevidenziale addCassaPrevidenziale(
		CassaPrevidenziale cassaPrevidenziale) throws SystemException {
		cassaPrevidenziale.setNew(true);

		return cassaPrevidenzialePersistence.update(cassaPrevidenziale);
	}

	/**
	 * Creates a new cassa previdenziale with the primary key. Does not add the cassa previdenziale to the database.
	 *
	 * @param codiceCassa the primary key for the new cassa previdenziale
	 * @return the new cassa previdenziale
	 */
	@Override
	public CassaPrevidenziale createCassaPrevidenziale(String codiceCassa) {
		return cassaPrevidenzialePersistence.create(codiceCassa);
	}

	/**
	 * Deletes the cassa previdenziale with the primary key from the database. Also notifies the appropriate model listeners.
	 *
	 * @param codiceCassa the primary key of the cassa previdenziale
	 * @return the cassa previdenziale that was removed
	 * @throws PortalException if a cassa previdenziale with the primary key could not be found
	 * @throws SystemException if a system exception occurred
	 */
	@Indexable(type = IndexableType.DELETE)
	@Override
	public CassaPrevidenziale deleteCassaPrevidenziale(String codiceCassa)
		throws PortalException, SystemException {
		return cassaPrevidenzialePersistence.remove(codiceCassa);
	}

	/**
	 * Deletes the cassa previdenziale from the database. Also notifies the appropriate model listeners.
	 *
	 * @param cassaPrevidenziale the cassa previdenziale
	 * @return the cassa previdenziale that was removed
	 * @throws SystemException if a system exception occurred
	 */
	@Indexable(type = IndexableType.DELETE)
	@Override
	public CassaPrevidenziale deleteCassaPrevidenziale(
		CassaPrevidenziale cassaPrevidenziale) throws SystemException {
		return cassaPrevidenzialePersistence.remove(cassaPrevidenziale);
	}

	@Override
	public DynamicQuery dynamicQuery() {
		Class<?> clazz = getClass();

		return DynamicQueryFactoryUtil.forClass(CassaPrevidenziale.class,
			clazz.getClassLoader());
	}

	/**
	 * Performs a dynamic query on the database and returns the matching rows.
	 *
	 * @param dynamicQuery the dynamic query
	 * @return the matching rows
	 * @throws SystemException if a system exception occurred
	 */
	@Override
	@SuppressWarnings("rawtypes")
	public List dynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return cassaPrevidenzialePersistence.findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * Performs a dynamic query on the database and returns a range of the matching rows.
	 *
	 * <p>
	 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.apuliait.model.impl.CassaPrevidenzialeModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	 * </p>
	 *
	 * @param dynamicQuery the dynamic query
	 * @param start the lower bound of the range of model instances
	 * @param end the upper bound of the range of model instances (not inclusive)
	 * @return the range of matching rows
	 * @throws SystemException if a system exception occurred
	 */
	@Override
	@SuppressWarnings("rawtypes")
	public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
		throws SystemException {
		return cassaPrevidenzialePersistence.findWithDynamicQuery(dynamicQuery,
			start, end);
	}

	/**
	 * Performs a dynamic query on the database and returns an ordered range of the matching rows.
	 *
	 * <p>
	 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.apuliait.model.impl.CassaPrevidenzialeModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	 * </p>
	 *
	 * @param dynamicQuery the dynamic query
	 * @param start the lower bound of the range of model instances
	 * @param end the upper bound of the range of model instances (not inclusive)
	 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	 * @return the ordered range of matching rows
	 * @throws SystemException if a system exception occurred
	 */
	@Override
	@SuppressWarnings("rawtypes")
	public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
		OrderByComparator orderByComparator) throws SystemException {
		return cassaPrevidenzialePersistence.findWithDynamicQuery(dynamicQuery,
			start, end, orderByComparator);
	}

	/**
	 * Returns the number of rows that match the dynamic query.
	 *
	 * @param dynamicQuery the dynamic query
	 * @return the number of rows that match the dynamic query
	 * @throws SystemException if a system exception occurred
	 */
	@Override
	public long dynamicQueryCount(DynamicQuery dynamicQuery)
		throws SystemException {
		return cassaPrevidenzialePersistence.countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * Returns the number of rows that match the dynamic query.
	 *
	 * @param dynamicQuery the dynamic query
	 * @param projection the projection to apply to the query
	 * @return the number of rows that match the dynamic query
	 * @throws SystemException if a system exception occurred
	 */
	@Override
	public long dynamicQueryCount(DynamicQuery dynamicQuery,
		Projection projection) throws SystemException {
		return cassaPrevidenzialePersistence.countWithDynamicQuery(dynamicQuery,
			projection);
	}

	@Override
	public CassaPrevidenziale fetchCassaPrevidenziale(String codiceCassa)
		throws SystemException {
		return cassaPrevidenzialePersistence.fetchByPrimaryKey(codiceCassa);
	}

	/**
	 * Returns the cassa previdenziale with the primary key.
	 *
	 * @param codiceCassa the primary key of the cassa previdenziale
	 * @return the cassa previdenziale
	 * @throws PortalException if a cassa previdenziale with the primary key could not be found
	 * @throws SystemException if a system exception occurred
	 */
	@Override
	public CassaPrevidenziale getCassaPrevidenziale(String codiceCassa)
		throws PortalException, SystemException {
		return cassaPrevidenzialePersistence.findByPrimaryKey(codiceCassa);
	}

	@Override
	public PersistedModel getPersistedModel(Serializable primaryKeyObj)
		throws PortalException, SystemException {
		return cassaPrevidenzialePersistence.findByPrimaryKey(primaryKeyObj);
	}

	/**
	 * Returns a range of all the cassa previdenziales.
	 *
	 * <p>
	 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link it.apuliait.model.impl.CassaPrevidenzialeModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
	 * </p>
	 *
	 * @param start the lower bound of the range of cassa previdenziales
	 * @param end the upper bound of the range of cassa previdenziales (not inclusive)
	 * @return the range of cassa previdenziales
	 * @throws SystemException if a system exception occurred
	 */
	@Override
	public List<CassaPrevidenziale> getCassaPrevidenziales(int start, int end)
		throws SystemException {
		return cassaPrevidenzialePersistence.findAll(start, end);
	}

	/**
	 * Returns the number of cassa previdenziales.
	 *
	 * @return the number of cassa previdenziales
	 * @throws SystemException if a system exception occurred
	 */
	@Override
	public int getCassaPrevidenzialesCount() throws SystemException {
		return cassaPrevidenzialePersistence.countAll();
	}

	/**
	 * Updates the cassa previdenziale in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
	 *
	 * @param cassaPrevidenziale the cassa previdenziale
	 * @return the cassa previdenziale that was updated
	 * @throws SystemException if a system exception occurred
	 */
	@Indexable(type = IndexableType.REINDEX)
	@Override
	public CassaPrevidenziale updateCassaPrevidenziale(
		CassaPrevidenziale cassaPrevidenziale) throws SystemException {
		return cassaPrevidenzialePersistence.update(cassaPrevidenziale);
	}

	/**
	 * Returns the cassa previdenziale local service.
	 *
	 * @return the cassa previdenziale local service
	 */
	public it.apuliait.service.CassaPrevidenzialeLocalService getCassaPrevidenzialeLocalService() {
		return cassaPrevidenzialeLocalService;
	}

	/**
	 * Sets the cassa previdenziale local service.
	 *
	 * @param cassaPrevidenzialeLocalService the cassa previdenziale local service
	 */
	public void setCassaPrevidenzialeLocalService(
		it.apuliait.service.CassaPrevidenzialeLocalService cassaPrevidenzialeLocalService) {
		this.cassaPrevidenzialeLocalService = cassaPrevidenzialeLocalService;
	}

	/**
	 * Returns the cassa previdenziale persistence.
	 *
	 * @return the cassa previdenziale persistence
	 */
	public CassaPrevidenzialePersistence getCassaPrevidenzialePersistence() {
		return cassaPrevidenzialePersistence;
	}

	/**
	 * Sets the cassa previdenziale persistence.
	 *
	 * @param cassaPrevidenzialePersistence the cassa previdenziale persistence
	 */
	public void setCassaPrevidenzialePersistence(
		CassaPrevidenzialePersistence cassaPrevidenzialePersistence) {
		this.cassaPrevidenzialePersistence = cassaPrevidenzialePersistence;
	}

	/**
	 * Returns the causale pagamento local service.
	 *
	 * @return the causale pagamento local service
	 */
	public it.apuliait.service.CausalePagamentoLocalService getCausalePagamentoLocalService() {
		return causalePagamentoLocalService;
	}

	/**
	 * Sets the causale pagamento local service.
	 *
	 * @param causalePagamentoLocalService the causale pagamento local service
	 */
	public void setCausalePagamentoLocalService(
		it.apuliait.service.CausalePagamentoLocalService causalePagamentoLocalService) {
		this.causalePagamentoLocalService = causalePagamentoLocalService;
	}

	/**
	 * Returns the causale pagamento persistence.
	 *
	 * @return the causale pagamento persistence
	 */
	public CausalePagamentoPersistence getCausalePagamentoPersistence() {
		return causalePagamentoPersistence;
	}

	/**
	 * Sets the causale pagamento persistence.
	 *
	 * @param causalePagamentoPersistence the causale pagamento persistence
	 */
	public void setCausalePagamentoPersistence(
		CausalePagamentoPersistence causalePagamentoPersistence) {
		this.causalePagamentoPersistence = causalePagamentoPersistence;
	}

	/**
	 * Returns the dati trasporto local service.
	 *
	 * @return the dati trasporto local service
	 */
	public it.apuliait.service.DatiTrasportoLocalService getDatiTrasportoLocalService() {
		return datiTrasportoLocalService;
	}

	/**
	 * Sets the dati trasporto local service.
	 *
	 * @param datiTrasportoLocalService the dati trasporto local service
	 */
	public void setDatiTrasportoLocalService(
		it.apuliait.service.DatiTrasportoLocalService datiTrasportoLocalService) {
		this.datiTrasportoLocalService = datiTrasportoLocalService;
	}

	/**
	 * Returns the dati trasporto persistence.
	 *
	 * @return the dati trasporto persistence
	 */
	public DatiTrasportoPersistence getDatiTrasportoPersistence() {
		return datiTrasportoPersistence;
	}

	/**
	 * Sets the dati trasporto persistence.
	 *
	 * @param datiTrasportoPersistence the dati trasporto persistence
	 */
	public void setDatiTrasportoPersistence(
		DatiTrasportoPersistence datiTrasportoPersistence) {
		this.datiTrasportoPersistence = datiTrasportoPersistence;
	}

	/**
	 * Returns the documento local service.
	 *
	 * @return the documento local service
	 */
	public it.apuliait.service.DocumentoLocalService getDocumentoLocalService() {
		return documentoLocalService;
	}

	/**
	 * Sets the documento local service.
	 *
	 * @param documentoLocalService the documento local service
	 */
	public void setDocumentoLocalService(
		it.apuliait.service.DocumentoLocalService documentoLocalService) {
		this.documentoLocalService = documentoLocalService;
	}

	/**
	 * Returns the documento persistence.
	 *
	 * @return the documento persistence
	 */
	public DocumentoPersistence getDocumentoPersistence() {
		return documentoPersistence;
	}

	/**
	 * Sets the documento persistence.
	 *
	 * @param documentoPersistence the documento persistence
	 */
	public void setDocumentoPersistence(
		DocumentoPersistence documentoPersistence) {
		this.documentoPersistence = documentoPersistence;
	}

	/**
	 * Returns the documento xml local service.
	 *
	 * @return the documento xml local service
	 */
	public it.apuliait.service.DocumentoXmlLocalService getDocumentoXmlLocalService() {
		return documentoXmlLocalService;
	}

	/**
	 * Sets the documento xml local service.
	 *
	 * @param documentoXmlLocalService the documento xml local service
	 */
	public void setDocumentoXmlLocalService(
		it.apuliait.service.DocumentoXmlLocalService documentoXmlLocalService) {
		this.documentoXmlLocalService = documentoXmlLocalService;
	}

	/**
	 * Returns the documento xml persistence.
	 *
	 * @return the documento xml persistence
	 */
	public DocumentoXmlPersistence getDocumentoXmlPersistence() {
		return documentoXmlPersistence;
	}

	/**
	 * Sets the documento xml persistence.
	 *
	 * @param documentoXmlPersistence the documento xml persistence
	 */
	public void setDocumentoXmlPersistence(
		DocumentoXmlPersistence documentoXmlPersistence) {
		this.documentoXmlPersistence = documentoXmlPersistence;
	}

	/**
	 * Returns the documento xml firmato local service.
	 *
	 * @return the documento xml firmato local service
	 */
	public it.apuliait.service.DocumentoXmlFirmatoLocalService getDocumentoXmlFirmatoLocalService() {
		return documentoXmlFirmatoLocalService;
	}

	/**
	 * Sets the documento xml firmato local service.
	 *
	 * @param documentoXmlFirmatoLocalService the documento xml firmato local service
	 */
	public void setDocumentoXmlFirmatoLocalService(
		it.apuliait.service.DocumentoXmlFirmatoLocalService documentoXmlFirmatoLocalService) {
		this.documentoXmlFirmatoLocalService = documentoXmlFirmatoLocalService;
	}

	/**
	 * Returns the documento xml firmato persistence.
	 *
	 * @return the documento xml firmato persistence
	 */
	public DocumentoXmlFirmatoPersistence getDocumentoXmlFirmatoPersistence() {
		return documentoXmlFirmatoPersistence;
	}

	/**
	 * Sets the documento xml firmato persistence.
	 *
	 * @param documentoXmlFirmatoPersistence the documento xml firmato persistence
	 */
	public void setDocumentoXmlFirmatoPersistence(
		DocumentoXmlFirmatoPersistence documentoXmlFirmatoPersistence) {
		this.documentoXmlFirmatoPersistence = documentoXmlFirmatoPersistence;
	}

	/**
	 * Returns the linea fattura local service.
	 *
	 * @return the linea fattura local service
	 */
	public it.apuliait.service.LineaFatturaLocalService getLineaFatturaLocalService() {
		return lineaFatturaLocalService;
	}

	/**
	 * Sets the linea fattura local service.
	 *
	 * @param lineaFatturaLocalService the linea fattura local service
	 */
	public void setLineaFatturaLocalService(
		it.apuliait.service.LineaFatturaLocalService lineaFatturaLocalService) {
		this.lineaFatturaLocalService = lineaFatturaLocalService;
	}

	/**
	 * Returns the linea fattura persistence.
	 *
	 * @return the linea fattura persistence
	 */
	public LineaFatturaPersistence getLineaFatturaPersistence() {
		return lineaFatturaPersistence;
	}

	/**
	 * Sets the linea fattura persistence.
	 *
	 * @param lineaFatturaPersistence the linea fattura persistence
	 */
	public void setLineaFatturaPersistence(
		LineaFatturaPersistence lineaFatturaPersistence) {
		this.lineaFatturaPersistence = lineaFatturaPersistence;
	}

	/**
	 * Returns the pagamenti local service.
	 *
	 * @return the pagamenti local service
	 */
	public it.apuliait.service.PagamentiLocalService getPagamentiLocalService() {
		return pagamentiLocalService;
	}

	/**
	 * Sets the pagamenti local service.
	 *
	 * @param pagamentiLocalService the pagamenti local service
	 */
	public void setPagamentiLocalService(
		it.apuliait.service.PagamentiLocalService pagamentiLocalService) {
		this.pagamentiLocalService = pagamentiLocalService;
	}

	/**
	 * Returns the pagamenti persistence.
	 *
	 * @return the pagamenti persistence
	 */
	public PagamentiPersistence getPagamentiPersistence() {
		return pagamentiPersistence;
	}

	/**
	 * Sets the pagamenti persistence.
	 *
	 * @param pagamentiPersistence the pagamenti persistence
	 */
	public void setPagamentiPersistence(
		PagamentiPersistence pagamentiPersistence) {
		this.pagamentiPersistence = pagamentiPersistence;
	}

	/**
	 * Returns the ricevente local service.
	 *
	 * @return the ricevente local service
	 */
	public it.apuliait.service.RiceventeLocalService getRiceventeLocalService() {
		return riceventeLocalService;
	}

	/**
	 * Sets the ricevente local service.
	 *
	 * @param riceventeLocalService the ricevente local service
	 */
	public void setRiceventeLocalService(
		it.apuliait.service.RiceventeLocalService riceventeLocalService) {
		this.riceventeLocalService = riceventeLocalService;
	}

	/**
	 * Returns the ricevente persistence.
	 *
	 * @return the ricevente persistence
	 */
	public RiceventePersistence getRiceventePersistence() {
		return riceventePersistence;
	}

	/**
	 * Sets the ricevente persistence.
	 *
	 * @param riceventePersistence the ricevente persistence
	 */
	public void setRiceventePersistence(
		RiceventePersistence riceventePersistence) {
		this.riceventePersistence = riceventePersistence;
	}

	/**
	 * Returns the terzo intermediario local service.
	 *
	 * @return the terzo intermediario local service
	 */
	public it.apuliait.service.TerzoIntermediarioLocalService getTerzoIntermediarioLocalService() {
		return terzoIntermediarioLocalService;
	}

	/**
	 * Sets the terzo intermediario local service.
	 *
	 * @param terzoIntermediarioLocalService the terzo intermediario local service
	 */
	public void setTerzoIntermediarioLocalService(
		it.apuliait.service.TerzoIntermediarioLocalService terzoIntermediarioLocalService) {
		this.terzoIntermediarioLocalService = terzoIntermediarioLocalService;
	}

	/**
	 * Returns the terzo intermediario persistence.
	 *
	 * @return the terzo intermediario persistence
	 */
	public TerzoIntermediarioPersistence getTerzoIntermediarioPersistence() {
		return terzoIntermediarioPersistence;
	}

	/**
	 * Sets the terzo intermediario persistence.
	 *
	 * @param terzoIntermediarioPersistence the terzo intermediario persistence
	 */
	public void setTerzoIntermediarioPersistence(
		TerzoIntermediarioPersistence terzoIntermediarioPersistence) {
		this.terzoIntermediarioPersistence = terzoIntermediarioPersistence;
	}

	/**
	 * Returns the trasmittente local service.
	 *
	 * @return the trasmittente local service
	 */
	public it.apuliait.service.TrasmittenteLocalService getTrasmittenteLocalService() {
		return trasmittenteLocalService;
	}

	/**
	 * Sets the trasmittente local service.
	 *
	 * @param trasmittenteLocalService the trasmittente local service
	 */
	public void setTrasmittenteLocalService(
		it.apuliait.service.TrasmittenteLocalService trasmittenteLocalService) {
		this.trasmittenteLocalService = trasmittenteLocalService;
	}

	/**
	 * Returns the trasmittente persistence.
	 *
	 * @return the trasmittente persistence
	 */
	public TrasmittentePersistence getTrasmittentePersistence() {
		return trasmittentePersistence;
	}

	/**
	 * Sets the trasmittente persistence.
	 *
	 * @param trasmittentePersistence the trasmittente persistence
	 */
	public void setTrasmittentePersistence(
		TrasmittentePersistence trasmittentePersistence) {
		this.trasmittentePersistence = trasmittentePersistence;
	}

	/**
	 * Returns the counter local service.
	 *
	 * @return the counter local service
	 */
	public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
		return counterLocalService;
	}

	/**
	 * Sets the counter local service.
	 *
	 * @param counterLocalService the counter local service
	 */
	public void setCounterLocalService(
		com.liferay.counter.service.CounterLocalService counterLocalService) {
		this.counterLocalService = counterLocalService;
	}

	/**
	 * Returns the resource local service.
	 *
	 * @return the resource local service
	 */
	public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
		return resourceLocalService;
	}

	/**
	 * Sets the resource local service.
	 *
	 * @param resourceLocalService the resource local service
	 */
	public void setResourceLocalService(
		com.liferay.portal.service.ResourceLocalService resourceLocalService) {
		this.resourceLocalService = resourceLocalService;
	}

	/**
	 * Returns the user local service.
	 *
	 * @return the user local service
	 */
	public com.liferay.portal.service.UserLocalService getUserLocalService() {
		return userLocalService;
	}

	/**
	 * Sets the user local service.
	 *
	 * @param userLocalService the user local service
	 */
	public void setUserLocalService(
		com.liferay.portal.service.UserLocalService userLocalService) {
		this.userLocalService = userLocalService;
	}

	/**
	 * Returns the user remote service.
	 *
	 * @return the user remote service
	 */
	public com.liferay.portal.service.UserService getUserService() {
		return userService;
	}

	/**
	 * Sets the user remote service.
	 *
	 * @param userService the user remote service
	 */
	public void setUserService(
		com.liferay.portal.service.UserService userService) {
		this.userService = userService;
	}

	/**
	 * Returns the user persistence.
	 *
	 * @return the user persistence
	 */
	public UserPersistence getUserPersistence() {
		return userPersistence;
	}

	/**
	 * Sets the user persistence.
	 *
	 * @param userPersistence the user persistence
	 */
	public void setUserPersistence(UserPersistence userPersistence) {
		this.userPersistence = userPersistence;
	}

	public void afterPropertiesSet() {
		Class<?> clazz = getClass();

		_classLoader = clazz.getClassLoader();

		PersistedModelLocalServiceRegistryUtil.register("it.apuliait.model.CassaPrevidenziale",
			cassaPrevidenzialeLocalService);
	}

	public void destroy() {
		PersistedModelLocalServiceRegistryUtil.unregister(
			"it.apuliait.model.CassaPrevidenziale");
	}

	/**
	 * Returns the Spring bean ID for this bean.
	 *
	 * @return the Spring bean ID for this bean
	 */
	@Override
	public String getBeanIdentifier() {
		return _beanIdentifier;
	}

	/**
	 * Sets the Spring bean ID for this bean.
	 *
	 * @param beanIdentifier the Spring bean ID for this bean
	 */
	@Override
	public void setBeanIdentifier(String beanIdentifier) {
		_beanIdentifier = beanIdentifier;
	}

	@Override
	public Object invokeMethod(String name, String[] parameterTypes,
		Object[] arguments) throws Throwable {
		Thread currentThread = Thread.currentThread();

		ClassLoader contextClassLoader = currentThread.getContextClassLoader();

		if (contextClassLoader != _classLoader) {
			currentThread.setContextClassLoader(_classLoader);
		}

		try {
			return _clpInvoker.invokeMethod(name, parameterTypes, arguments);
		}
		finally {
			if (contextClassLoader != _classLoader) {
				currentThread.setContextClassLoader(contextClassLoader);
			}
		}
	}

	protected Class<?> getModelClass() {
		return CassaPrevidenziale.class;
	}

	protected String getModelClassName() {
		return CassaPrevidenziale.class.getName();
	}

	/**
	 * Performs an SQL query.
	 *
	 * @param sql the sql query
	 */
	protected void runSQL(String sql) throws SystemException {
		try {
			DataSource dataSource = cassaPrevidenzialePersistence.getDataSource();

			SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
					sql, new int[0]);

			sqlUpdate.update();
		}
		catch (Exception e) {
			throw new SystemException(e);
		}
	}

	@BeanReference(type = it.apuliait.service.CassaPrevidenzialeLocalService.class)
	protected it.apuliait.service.CassaPrevidenzialeLocalService cassaPrevidenzialeLocalService;
	@BeanReference(type = CassaPrevidenzialePersistence.class)
	protected CassaPrevidenzialePersistence cassaPrevidenzialePersistence;
	@BeanReference(type = it.apuliait.service.CausalePagamentoLocalService.class)
	protected it.apuliait.service.CausalePagamentoLocalService causalePagamentoLocalService;
	@BeanReference(type = CausalePagamentoPersistence.class)
	protected CausalePagamentoPersistence causalePagamentoPersistence;
	@BeanReference(type = it.apuliait.service.DatiTrasportoLocalService.class)
	protected it.apuliait.service.DatiTrasportoLocalService datiTrasportoLocalService;
	@BeanReference(type = DatiTrasportoPersistence.class)
	protected DatiTrasportoPersistence datiTrasportoPersistence;
	@BeanReference(type = it.apuliait.service.DocumentoLocalService.class)
	protected it.apuliait.service.DocumentoLocalService documentoLocalService;
	@BeanReference(type = DocumentoPersistence.class)
	protected DocumentoPersistence documentoPersistence;
	@BeanReference(type = it.apuliait.service.DocumentoXmlLocalService.class)
	protected it.apuliait.service.DocumentoXmlLocalService documentoXmlLocalService;
	@BeanReference(type = DocumentoXmlPersistence.class)
	protected DocumentoXmlPersistence documentoXmlPersistence;
	@BeanReference(type = it.apuliait.service.DocumentoXmlFirmatoLocalService.class)
	protected it.apuliait.service.DocumentoXmlFirmatoLocalService documentoXmlFirmatoLocalService;
	@BeanReference(type = DocumentoXmlFirmatoPersistence.class)
	protected DocumentoXmlFirmatoPersistence documentoXmlFirmatoPersistence;
	@BeanReference(type = it.apuliait.service.LineaFatturaLocalService.class)
	protected it.apuliait.service.LineaFatturaLocalService lineaFatturaLocalService;
	@BeanReference(type = LineaFatturaPersistence.class)
	protected LineaFatturaPersistence lineaFatturaPersistence;
	@BeanReference(type = it.apuliait.service.PagamentiLocalService.class)
	protected it.apuliait.service.PagamentiLocalService pagamentiLocalService;
	@BeanReference(type = PagamentiPersistence.class)
	protected PagamentiPersistence pagamentiPersistence;
	@BeanReference(type = it.apuliait.service.RiceventeLocalService.class)
	protected it.apuliait.service.RiceventeLocalService riceventeLocalService;
	@BeanReference(type = RiceventePersistence.class)
	protected RiceventePersistence riceventePersistence;
	@BeanReference(type = it.apuliait.service.TerzoIntermediarioLocalService.class)
	protected it.apuliait.service.TerzoIntermediarioLocalService terzoIntermediarioLocalService;
	@BeanReference(type = TerzoIntermediarioPersistence.class)
	protected TerzoIntermediarioPersistence terzoIntermediarioPersistence;
	@BeanReference(type = it.apuliait.service.TrasmittenteLocalService.class)
	protected it.apuliait.service.TrasmittenteLocalService trasmittenteLocalService;
	@BeanReference(type = TrasmittentePersistence.class)
	protected TrasmittentePersistence trasmittentePersistence;
	@BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
	protected com.liferay.counter.service.CounterLocalService counterLocalService;
	@BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
	protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
	@BeanReference(type = com.liferay.portal.service.UserLocalService.class)
	protected com.liferay.portal.service.UserLocalService userLocalService;
	@BeanReference(type = com.liferay.portal.service.UserService.class)
	protected com.liferay.portal.service.UserService userService;
	@BeanReference(type = UserPersistence.class)
	protected UserPersistence userPersistence;
	private String _beanIdentifier;
	private ClassLoader _classLoader;
	private CassaPrevidenzialeLocalServiceClpInvoker _clpInvoker = new CassaPrevidenzialeLocalServiceClpInvoker();
}